<?xml version="1.0" encoding="UTF-8" ?>
<%@page import="game.util.User"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
  	request.setCharacterEncoding("UTF-8");
%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript" src="resources/js/game.js"></script>
	<link rel="stylesheet" type="text/css" href="resources/css/game.css"></link>
	<title>Mancala Game</title>
</head>
<body onload="disableAllButtons();">
	<div id="header">
	   <h1>Mancala üzleti web technológiák 2011</h1>
	</div>
	<div id="login">
		<p>Felhasználónév: <c:out value="${name}" /> </p>
		<input type="submit" id="start" value="Start!" class="button" onclick="init()" />
	</div>
	<div id="content">
			<input type="submit" id="continue" value="Folytatom" class="button" onclick="doTimer()" />
			<input type="text" id="counter" readonly="readonly"/>
			<input type="submit" id="pause" value="Pause" class="button" onclick="stopCount()" />
			<input type="submit" id="next" value="Tovább az eredményekhez" class="button" onclick="location.href='score.jsp'" />
			
		<div id="playingField">		
		
			<jsp:useBean id="game" class="game.util.Game" scope="session"></jsp:useBean>
			<jsp:setProperty property="*" name="game" />
			
			<!-- dynamic table -->	
			<table>
		
			     <tr id="computer">
			     <c:forEach var="i" begin="1" end="${hole+1}" step="1">
			     	<td class="hole">			     	
 				    	<input type="submit" value="" class="button"/> 
				    </td>
			     </c:forEach>
			     </tr>
			     
			     <tr id="player">
			     <c:forEach var="i" begin="1" end="${hole+1}" step="1">
			     	<td class="hole">			     	
 				   		<input id="user${i}" type="submit"  value=""  class="button" onclick="move(${i}) "/> 
				    </td>
			     </c:forEach>
			    </tr>

			</table>
		</div>
	</div>
	<div id="footer">
	   <p>Gasztány Richárd <a href="/Mancala/tartalom.html">Tartalom</a> </p>
	</div>
</body>
</html>